Optimal. Leaf size=122 \[ \frac {\left (5 a^2+2 a b+b^2\right ) \sin (c+d x) \cos (c+d x)}{16 d}+\frac {1}{16} x \left (5 a^2+2 a b+b^2\right )+\frac {(a-b) (5 a+3 b) \sin (c+d x) \cos ^3(c+d x)}{24 d}+\frac {(a-b) \sin (c+d x) \cos ^5(c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.13, antiderivative size = 122, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.217, Rules used = {3675, 413, 385, 199, 203} \[ \frac {\left (5 a^2+2 a b+b^2\right ) \sin (c+d x) \cos (c+d x)}{16 d}+\frac {1}{16} x \left (5 a^2+2 a b+b^2\right )+\frac {(a-b) (5 a+3 b) \sin (c+d x) \cos ^3(c+d x)}{24 d}+\frac {(a-b) \sin (c+d x) \cos ^5(c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 199
Rule 203
Rule 385
Rule 413
Rule 3675
Rubi steps
\begin {align*} \int \cos ^6(c+d x) \left (a+b \tan ^2(c+d x)\right )^2 \, dx &=\frac {\operatorname {Subst}\left (\int \frac {\left (a+b x^2\right )^2}{\left (1+x^2\right )^4} \, dx,x,\tan (c+d x)\right )}{d}\\ &=\frac {(a-b) \cos ^5(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 d}+\frac {\operatorname {Subst}\left (\int \frac {a (5 a+b)+3 b (a+b) x^2}{\left (1+x^2\right )^3} \, dx,x,\tan (c+d x)\right )}{6 d}\\ &=\frac {(a-b) (5 a+3 b) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {(a-b) \cos ^5(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 d}+\frac {\left (5 a^2+2 a b+b^2\right ) \operatorname {Subst}\left (\int \frac {1}{\left (1+x^2\right )^2} \, dx,x,\tan (c+d x)\right )}{8 d}\\ &=\frac {\left (5 a^2+2 a b+b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {(a-b) (5 a+3 b) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {(a-b) \cos ^5(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 d}+\frac {\left (5 a^2+2 a b+b^2\right ) \operatorname {Subst}\left (\int \frac {1}{1+x^2} \, dx,x,\tan (c+d x)\right )}{16 d}\\ &=\frac {1}{16} \left (5 a^2+2 a b+b^2\right ) x+\frac {\left (5 a^2+2 a b+b^2\right ) \cos (c+d x) \sin (c+d x)}{16 d}+\frac {(a-b) (5 a+3 b) \cos ^3(c+d x) \sin (c+d x)}{24 d}+\frac {(a-b) \cos ^5(c+d x) \sin (c+d x) \left (a+b \tan ^2(c+d x)\right )}{6 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 0.37, size = 87, normalized size = 0.71 \[ \frac {12 (b+(1-2 i) a) (b+(1+2 i) a) (c+d x)+(a-b)^2 \sin (6 (c+d x))+3 (3 a+b) (a-b) \sin (4 (c+d x))+3 (5 a-b) (3 a+b) \sin (2 (c+d x))}{192 d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.49, size = 98, normalized size = 0.80 \[ \frac {3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} d x + {\left (8 \, {\left (a^{2} - 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )^{5} + 2 \, {\left (5 \, a^{2} + 2 \, a b - 7 \, b^{2}\right )} \cos \left (d x + c\right )^{3} + 3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} \cos \left (d x + c\right )\right )} \sin \left (d x + c\right )}{48 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.83, size = 166, normalized size = 1.36 \[ \frac {b^{2} \left (-\frac {\left (\sin ^{3}\left (d x +c \right )\right ) \left (\cos ^{3}\left (d x +c \right )\right )}{6}-\frac {\left (\cos ^{3}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{8}+\frac {\cos \left (d x +c \right ) \sin \left (d x +c \right )}{16}+\frac {d x}{16}+\frac {c}{16}\right )+2 a b \left (-\frac {\left (\cos ^{5}\left (d x +c \right )\right ) \sin \left (d x +c \right )}{6}+\frac {\left (\cos ^{3}\left (d x +c \right )+\frac {3 \cos \left (d x +c \right )}{2}\right ) \sin \left (d x +c \right )}{24}+\frac {d x}{16}+\frac {c}{16}\right )+a^{2} \left (\frac {\left (\cos ^{5}\left (d x +c \right )+\frac {5 \left (\cos ^{3}\left (d x +c \right )\right )}{4}+\frac {15 \cos \left (d x +c \right )}{8}\right ) \sin \left (d x +c \right )}{6}+\frac {5 d x}{16}+\frac {5 c}{16}\right )}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.50, size = 131, normalized size = 1.07 \[ \frac {3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} {\left (d x + c\right )} + \frac {3 \, {\left (5 \, a^{2} + 2 \, a b + b^{2}\right )} \tan \left (d x + c\right )^{5} + 8 \, {\left (5 \, a^{2} + 2 \, a b - b^{2}\right )} \tan \left (d x + c\right )^{3} + 3 \, {\left (11 \, a^{2} - 2 \, a b - b^{2}\right )} \tan \left (d x + c\right )}{\tan \left (d x + c\right )^{6} + 3 \, \tan \left (d x + c\right )^{4} + 3 \, \tan \left (d x + c\right )^{2} + 1}}{48 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 13.24, size = 126, normalized size = 1.03 \[ x\,\left (\frac {5\,a^2}{16}+\frac {a\,b}{8}+\frac {b^2}{16}\right )+\frac {\left (\frac {5\,a^2}{16}+\frac {a\,b}{8}+\frac {b^2}{16}\right )\,{\mathrm {tan}\left (c+d\,x\right )}^5+\left (\frac {5\,a^2}{6}+\frac {a\,b}{3}-\frac {b^2}{6}\right )\,{\mathrm {tan}\left (c+d\,x\right )}^3+\left (\frac {11\,a^2}{16}-\frac {a\,b}{8}-\frac {b^2}{16}\right )\,\mathrm {tan}\left (c+d\,x\right )}{d\,\left ({\mathrm {tan}\left (c+d\,x\right )}^6+3\,{\mathrm {tan}\left (c+d\,x\right )}^4+3\,{\mathrm {tan}\left (c+d\,x\right )}^2+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________